// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  ssr: false,
  routeRules: {
    '/account/**': { ssr: false },
    '/editor/**': { ssr: false }

  },

  devtools: { enabled: false },

  components: {
    global: true,
    dirs: ["~/components"],
  },

  modules: [
    "@nuxtjs/tailwindcss",
    "@element-plus/nuxt",
    "@pinia/nuxt",
    "@pinia-plugin-persistedstate/nuxt",
    "nuxt-electron"
  ],
  electron: {
    disableDefaultOptions: true,
    build: [
      {
        // Main-Process entry file of the Electron App.
        entry: 'electron/main.ts',
      },{
        entry: 'electron/preload.ts',
        onstart(args) {
          // Notify the Renderer-Process to reload the page when the Preload-Scripts build is complete, 
          // instead of restarting the entire Electron App.
          args.reload()
        },
      },
    ],
  },

  runtimeConfig: {

  },

  app: {
    cdnURL: './',
    head: {
      title: '明志智图-AI作图必备神器',
      titleTemplate: '%s - 明志智图',
      htmlAttrs: {
        lang: 'zh',
      },
      meta: [{
        charset: 'utf-8',
      },
      {
        name: 'viewport',
        content: 'width=device-width, initial-scale=1',
      },
      {
        hid: 'keywords',
        name: 'keywords',
        content: '明志智图,AI作图,在线设计,海报设计,设计素材,设计网站',
      },
      {
        hid: 'description',
        name: 'description',
        content: '在线快速图片和视频编辑,不会PS也能搞定设计。海报、简历、PPT、公众号配图、电商等海量模板快速出图。三秒抠图实用便捷,抖音快手热门视频轻松搞定。海量正版授权资源,商用无忧。',
      },
      {
        name: 'format-detection',
        content: 'telephone=no',
      },
      {
        name: 'baidu-site-verification',
        content: 'codeva-2WWepEIYMB',
      },
      {
        name: '360-site-verification',
        content: '7ad12ae293da8be75dbd64640eaa7dea',
      }
      ],
      link: [{
        rel: 'shortcut icon',
        type: 'image/x-icon',
        href: '/favicon.ico',
      }, {
        rel: 'stylesheet',
        href: 'https://www.superox.cn/assets/libs/font-awesome/css/font-awesome.min.css',
      }
      ],
    },
  },

  compatibilityDate: '2024-08-29',
});